home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir26 / epi601_2.zip / FILES07.EXE / BLOCK.EPA < prev    next >
Text File  |  1994-08-22  |  12KB  |  424 lines

  1. _DOS erase temp
  2. _DOS copy user1.txt doc1.txt
  3. %
  4. _DISPLAY
  5.  
  6.         -- LESSON 5 --
  7.  
  8.         BLOCK COMMANDS
  9.  
  10. ..............................
  11. _ENDDISPLAY
  12. %
  13. _DISPLAY
  14.  One of the advantages of word processing is the
  15.  ability to "cut and paste" portions of your document
  16.  without having to retype the entire document.  These
  17.  capabilities are called BLOCK COMMANDS.
  18. _ENDDISPLAY
  19. %
  20. _DISPLAY
  21.  The topics covered in this lesson include:
  22.  
  23.    * defining a block of text
  24.  
  25.    * copying, moving or deleting blocks
  26.  
  27.    * writing blocks to another file
  28.  
  29.    * reading files into the current file as
  30.      a block
  31. _ENDDISPLAY
  32. %
  33. _DISPLAY
  34.  A BLOCK consists of any contiguous portion of text --
  35.  it may be as short as a line or as long as an entire
  36.  document.
  37.  
  38.  Before you can use any of the block commands, you must
  39.  first define the block.  Once the block is defined, you
  40.  can then copy, move or delete the block, or write the
  41.  block to another file.
  42.  
  43.  All of the block commands can be found in the <F8>-BLK
  44.  menu.
  45.  
  46. _ENDDISPLAY
  47. %
  48. _DISPLAY
  49.  To define the block of text, you must mark the beginning
  50.  and end of the block using the <F8>-"Begin block" and
  51.  "End block" commands or <Ctrl-K B> and <Ctrl-K K>.
  52.  
  53.  To mark the BEGINNING OF A BLOCK:
  54.  
  55.    *Move the cursor to the first character of the
  56.     block.
  57.  
  58.    *Press <F8>, select the "Begin block" option using
  59.     the up and down arrow keys, and press <Enter> or press
  60.     <Ctrl-K B>.
  61.  
  62.  To mark the END OF A BLOCK:
  63.  
  64.    *Move the cursor to the space just beyond the last
  65.     character of the block.
  66.  
  67.    *Press <F8>, select the "End block" option using
  68.     the up and down arrow keys, and press <Enter> or press
  69.     <Ctrl-K K>.
  70. _ENDDISPLAY
  71. %
  72. _DISPLAY
  73.  At the next screen, you will first retrieve a file and
  74.  then practice the first two block commands:
  75.  
  76.     *Press <F2> and select "Open file this window".
  77.  
  78.     *Type the filename DOC1.TXT in the prompt box
  79.      and press <Enter>.  The file will appear on
  80.      the screen.
  81.  
  82.     *Choose any part of the file to be the block.  Move
  83.      the cursor to the first character of the block.
  84.      Press <F8>, select "Begin block" and press <Enter>
  85.      (or <Ctrl-K B>).
  86.  
  87.     *Move the cursor just beyond the last character in
  88.      the block.  Press <F8>, select "End block" and
  89.      press <Enter> (or <Ctrl-K K>).  The block will
  90.      appear highlighted on the screen.
  91. _ENDDISPLAY
  92. %
  93. [<F2>-Open file, file = DOC1.TXT; <F8>-Begin blk, then End blk]
  94. _CLEARALL
  95. %
  96. _DISPLAY
  97.  As you noticed, after you marked the beginning and end
  98.  of the block, it appeared highlighted on the screen.
  99.  In order to invoke the block commands, the block must
  100.  be highlighted.
  101.  
  102.  Once the command has been performed, you can remove the
  103.  highlight in one of two ways:  by using the <F8>-"Hide
  104.  block display" command, or by pressing <Ctrl-K H>.
  105. _ENDDISPLAY
  106. %
  107. _DISPLAY
  108.  The next block command to review is the COPY BLOCK command.
  109.  This is helpful if you have any portion of text that is
  110.  repeated throughout the document.
  111.  
  112.  The COPY command places a duplicate of the block at the
  113.  specified point in the document; the original block is left
  114.  intact in its original position.
  115. _ENDDISPLAY
  116. %
  117. _DISPLAY
  118.  To use the COPY BLOCK command:
  119.  
  120.   *Mark the beginning and end of the block using
  121.    the <F8> pop-up menu or <Ctrl-K B> and <Ctrl-K K>.
  122.  
  123.   *Move the cursor to the point in the document
  124.    where the block should be COPIED TO.
  125.  
  126.   *Press <F8>, select "Copy block to here", and
  127.    press <Enter> or press <Ctrl-K C>.
  128.  
  129.   *The block will be copied, and will appear
  130.    highlighted.  Press <F8>-"Hide block display"
  131.    and then <Enter> (or <Ctrl-K H> to unhighlight
  132.    the block.
  133. _ENDDISPLAY
  134. %
  135. _DISPLAY
  136.  The next screen will take you back to the file
  137.  DOC1.TXT.  Practice using the <F8>-"Copy block
  138.  to here" command after marking the beginning and
  139.  end of the block.
  140. _ENDDISPLAY
  141. %
  142. _OPENFILE DOC1.TXT
  143. [Define block with <F8>, move cursor, <F8>-Copy block to here]
  144. _CLEARALL
  145. %
  146. _DISPLAY
  147.  The next block command is MOVE BLOCK TO HERE.  This is similar
  148.  to the Copy command except that the block of text is actually
  149.  moved, rather than copied, to the new location.  The remaining
  150.  text moves to the left to fill the empty space left by the
  151.  block that was moved.
  152.  
  153.  To use the MOVE command:
  154.  
  155.    *Define the block of text to be moved.
  156.  
  157.    *Move the cursor to the position where the block
  158.     should be moved.
  159.  
  160.    *Press <F8>-"Move block to here" and then press <Enter>
  161.     or press <Ctrl-K V>.
  162.  
  163.    *Unhighlight the block using <F8>-"Hide block display".
  164. _ENDDISPLAY
  165. %
  166. _DISPLAY
  167.  Now return to the file and practice using the MOVE
  168.  BLOCK command.  Notice how the text moves to fill
  169.  the space left when the block was moved.
  170.  
  171.  To review the command again:
  172.  
  173.      *Define the block using the <F8> menu.
  174.  
  175.      *Place the cursor at the location where
  176.       the block will be moved.
  177.  
  178.      *Press <F8>-"Move block to here" and
  179.       press <Enter>.
  180. _ENDDISPLAY
  181. %
  182. _OPENFILE DOC1.TXT
  183. [Define block, move cursor to new location, <F8>-Move block]
  184. _CLEARALL
  185. %
  186. _DISPLAY
  187.  Another useful block command is DELETE BLOCK.
  188.  If you decide to remove a portion of the document,
  189.  this command allows you to do it more easily than
  190.  by deleting one line at a time.
  191.  
  192.  One word of caution when deleting a block of text:
  193.  there is no way to undelete or restore a block in its
  194.  entirety.  EPED stores only the last 20 lines that were
  195.  deleted, and allows you to undelete these 20 lines with
  196.  the <F4>-"Undelete" command.  So, for example, if the
  197.  block that is deleted is 30 lines long, you could recall
  198.  the last 20 lines but the first 10 lines will be lost.
  199. _ENDDISPLAY
  200. %
  201. _DISPLAY
  202.  To use the DELETE BLOCK command:
  203.  
  204.    *Define the block to be deleted using the
  205.     <F8> menu.
  206.  
  207.    *Press <F8>, select the "Delete block" option
  208.     and press <Enter>.
  209.  
  210.    *The block will disappear from the screen and
  211.     the remaining text will move up to the point
  212.     where the block had been located.
  213.  
  214.  At the next screen practice the DELETE BLOCK command.
  215.  Notice the remaining text as it is repositioned on the
  216.  screen.
  217. _ENDDISPLAY
  218. %
  219. _OPENFILE DOC1.TXT
  220. [<F8> Begin block & End block, then Delete block]
  221. _CLEARALL
  222. %
  223. _DISPLAY
  224.  The next two block commands involve interaction with
  225.  other files.
  226.  
  227.  The first command allows you to WRITE A BLOCK TO A
  228.  FILE.  This copies the block to another file while
  229.  leaving the original block and file intact, as it did
  230.  in the Copy Block command.
  231.  
  232.  The second command is READ FILE IN AS BLOCK.  This
  233.  copies another file into your current document at the
  234.  cursor location.  The file from which the block is read
  235.  remains unchanged.
  236. _ENDDISPLAY
  237. %
  238. _DISPLAY
  239.  These two commands are useful if there is a portion
  240.  of text that is used frequently in letters or some
  241.  other document.  You can write this portion of text
  242.  to a separate file.
  243.  
  244.  When you create the next document that should include
  245.  this text, you simply read this separate file into
  246.  the new document.  This eliminates the need to retype
  247.  the text each time it is required in a new document.
  248. _ENDDISPLAY
  249. %
  250. _DISPLAY
  251.  Now let's review both of these commands in more detail.
  252.  
  253.  To WRITE A BLOCK TO A FILE:
  254.  
  255.    *Define the block in the current file using the
  256.     <F8> menu.
  257.  
  258.    *Press <F8>, choose "Write block to file..", and
  259.     press <Enter>.
  260.  
  261.    *In the prompt box, type the name of the file TO
  262.     WHICH the block should be written.
  263.  
  264.    *Press <Enter> and the block will be written to
  265.     the other file.
  266. _ENDDISPLAY
  267. %
  268. _DISPLAY
  269.  At the next screen, you will be back to the file
  270.  DOC1.TXT.  Practice writing a block to another
  271.  file called TEMP.  To review the steps again:
  272.  
  273.    *Define the block with the <F8> menu.
  274.  
  275.    *Press <F8>-"Write block to file..", and press
  276.     <Enter>
  277.  
  278.    *Type the filename TEMP in the prompt box and
  279.     press <Enter>.
  280. _ENDDISPLAY
  281. %
  282. _OPENFILE DOC1.TXT
  283. [Define block, <F8>-Write block to.., file = TEMP, then <Enter>]
  284. _CLEARALL
  285. %
  286. _DISPLAY
  287.  If you want to verify that the block was written to
  288.  the new file, you can simply retrieve the new file
  289.  using the <F2>-FILE menu.  To do this:
  290.  
  291.    *Press <F2> and select "Open file this window".
  292.  
  293.    *At the prompt box, type the name of the file
  294.     that the block was written to.
  295.  
  296.    *Press <Enter> and the file will be displayed
  297.     on the screen.
  298.  
  299.  At the next screen, retrieve the file TEMP to verify
  300.  that the block you defined was written to this file.
  301. _ENDDISPLAY
  302. %
  303. [<F2>-Open file, filename = TEMP, press <Enter>]
  304. _CLEARALL
  305. %
  306. _DISPLAY
  307.  The second command, READ FILE IN AS BLOCK, copies
  308.  another file into the file in which you are currently
  309.  working.  After the file is read into your current
  310.  document, the text will appear highlighted as a block.
  311.  You can hide the block display using the <F8>-"Hide
  312.  block display" command.
  313. _ENDDISPLAY
  314. %
  315. _DISPLAY
  316.  The steps for reading a file in as a block are:
  317.  
  318.    *Begin in the file INTO WHICH you want
  319.     to read the other file.
  320.  
  321.    *Move the cursor to the location in the
  322.     document where you want the text to be
  323.     copied.
  324.  
  325.    *Press <F8>-"Read file in as block", then
  326.     type the name of the file that contains
  327.     the text to be read into your current file.
  328.     Press <Enter> and the text from the other
  329.     file will be copied into your current file.
  330. _ENDDISPLAY
  331. %
  332. _DISPLAY
  333.  Now you will return to the file DOC1.TXT.  Practice
  334.  reading the file TEMP into the current file DOC1.TXT.
  335.  
  336.  To review the steps again:
  337.  
  338.      *While in the current file DOC1.TXT, move
  339.       the cursor to the location where you want
  340.       the text to appear.
  341.  
  342.      *Press <F8>, select "Read file in as block"
  343.       and press <Enter>.
  344.  
  345.      *At the prompt box, type the filename TEMP,
  346.       and press <Enter>.  The contents of the file
  347.       TEMP will now appear as a highlighted block
  348.       in your current file.  Move the cursor down
  349.       to see the highlighted block of text.
  350. _ENDDISPLAY
  351. %
  352. _OPENFILE DOC1.TXT
  353. [Move cursor, <F8>-Read file in.., file = TEMP, then <Enter>]
  354. _CLEARALL
  355. %
  356. _DISPLAY
  357.  The last command in the <F8> menu, FORMAT CURRENT BLOCK,
  358.  is useful if you want to reformat a portion of your
  359.  document, or to reformat a block of text that was read
  360.  into the current document from another file.  This is
  361.  similar to the "Reformat paragraph" command, except that
  362.  it allows you to reformat more than one paragraph at a
  363.  time.  This command functions only if word wrap is On.
  364.  
  365.  The steps are similar to the other block commands:
  366.  
  367.      *Define the block using the <F8> menu.
  368.  
  369.      *Select "Format current block" and press
  370.       <Enter>.  The text in the entire block will
  371.       be reformatted.
  372. _ENDDISPLAY
  373. %
  374. _DISPLAY
  375.  That completes the introduction to BLOCK COMMANDS.
  376.  Let's review once again all of the commands included
  377.  in the <F8>-BLK menu:
  378.  
  379.    *In order to perform the block commands, you
  380.     must first define the block, and make sure
  381.     that the block is highlighted.
  382.  
  383.    *To DEFINE A BLOCK, mark the beginning and end
  384.     of the block using the "Begin block" and "End
  385.     block" commands.
  386. _ENDDISPLAY
  387. %
  388. _DISPLAY
  389.  *COPY BLOCK TO HERE places a duplicate of the
  390.   block at the specified location in the document.
  391.  
  392.  *MOVE BLOCK TO HERE moves the specified block to
  393.   a new location in the document.  Remaining text
  394.   moves left to fill the space where the block
  395.   was originally located.
  396.  
  397.  *DELETE BLOCK removes the defined block from the
  398.   file.  Remaining text moves left to fill the blank
  399.   spaces.
  400. _ENDDISPLAY
  401. %
  402. _DISPLAY
  403.  *WRITE BLOCK TO FILE copies a block to another
  404.   file, leaving the original block intact.
  405.  
  406.  *READ FILE IN AS BLOCK copies another file into
  407.   the current file.
  408.  
  409.  *FORMAT CURRENT BLOCK reformats an entire block of
  410.   text rather than one paragraph at a time, as in
  411.   the <F4>-Format paragraph command.  This command
  412.   is functional only if word wrap is On.
  413. _ENDDISPLAY
  414. %
  415. _DISPLAY
  416.  That concludes Lesson 5.  Now you will return to
  417.  the Tutorial Menu, where you can choose another
  418.  lesson or exit from the tutorial.
  419. _ENDDISPLAY
  420. %
  421. _RUN WPTM.EPA
  422.  
  423.  
  424.